<form th:action="@{/admin/m/ext/question/add.gsp}" id="addForm" class="form-horizontal" role="form" action="#" method="post">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
		<h4 class="modal-title">新增问卷信息</h4>
	</div>
	<div class="modal-body">
		<div class="row">
			<div class="col-md-12">
				<div class="form-group">
					<label class="col-md-3 control-label">问卷标题<label class="text-danger">*</label>：</label>
					<div class="col-md-7">
						<input name="title" placeholder="请输入问卷标题" type="text" class="form-control" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-md-3 control-label">问卷编码<label class="text-danger">*</label>：</label>
					<div class="col-md-7">
						<input name="codeNum" placeholder="请输入问卷编码" type="text" class="form-control" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-md-3 control-label">问卷模式<label class="text-danger">*</label>：</label>
					<div class="col-md-7">
						<select class="form-control" name="mode">
							<option value="1">独立访客</option>
							<option value="2">独立IP</option>
							<option value="1">独立用户</option>
						</select>
					</div>
				</div>
				<div class="form-group">
                    <label class="col-md-3 control-label">开始时间<label class="text-danger">*</label>：</label>
                    <div class="col-md-7">
                        <div class="input-group date">
                            <input name="startTime" readOnly="true" type="text" class="form-control"/>
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">结束时间：</label>
                    <div class="col-md-7">
                        <div class="input-group date">
                            <input name="endTime" readOnly="true" type="text" class="form-control"/>
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        </div>
                    </div>
                </div>
				<div class="form-group">
					<label class="col-md-3 control-label">总票数<label class="text-danger">*</label>：</label>
					<div class="col-md-7">
						<input name="totalCount" value="0" placeholder="请输入总票数" type="text" class="form-control" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-md-3 control-label">描述：</label>
					<div class="col-md-7">
						<textarea name="description" rows="4" class="form-control" placeholder="最多输入140字"></textarea>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="modal-footer">
		<button class="btn btn-primary" type="submit">
			<strong>提 交</strong>
		</button>
		<button type="button" class="btn btn-default" data-dismiss="modal">
			<strong>关 闭</strong>
		</button>
	</div>
</form>
<script th:inline="javascript">
	$('.date').datepicker({
	    todayBtn: "linked",
	    keyboardNavigation: false,
	    forceParse: false,
	    initialDate : new Date(),
	    altField: '#actualDate',
	    calendarWeeks: true,
	    autoclose: true
	});
    /*<![CDATA[*/
    $(function() {
        var rules = {
            title : {
                required : true,
                maxlength : 40
            },
            codeNum : {
                required : true,
                maxlength : 20
            },
            startTime : {
                required : true
            },
            totalCount : {
                required : true,
                digits:true,
                max : 9999999,
                min : 0
            }
        }
        var messages = {

        }
        myTable.add('commonWin', 'addForm', rules, messages);
    });
    /*]]>*/
</script>